﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SystemMHB.Domian;
using SystemMHB.Infrstructer.Interface;

namespace SystemMHB.Infrstructer.Impl
{
    public class ProcessTaskRepository : BeanRepository<ProcessTask>, IProcessTaskRepository 
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="dbContext">上下文</param>
        public ProcessTaskRepository(ApplicationDbContext dbContext) : base(dbContext) { }
        /// <summary>
        /// 添加数据信息
        /// </summary>
        /// <param name="expre">要添加的数据信息</param>
        /// <returns>返回受影响行数</returns>
        public async Task<int> AddAsync(ProcessTask expre)
        {
            return await base.AddAsync(expre);
        }
        /// <summary>
        /// 显示全部数据信息
        /// </summary>
        /// <returns>返回数据信息集合</returns>
        public async Task<List<ProcessTask>> GetAllAsync()
        {
            return await base.GetAllAsync();
        }
        /// <summary>
        /// 反填
        /// </summary>
        /// <param name="id">编号</param>
        /// <returns>返回数据信息</returns>
        public async Task<ProcessTask> GetModelAsync(int id)
        {
            return await base.GetModelAsync(id);
        }
        /// <summary>
        /// 修改数据信息（逻辑删除）可以批量删除
        /// </summary>
        /// <param name="expre">修改后的数据信息</param>
        /// <returns>返回受影响行数</returns>
        public async Task<int> UpdateAsync(ProcessTask expre)
        {
            return await base.UpdateAsync(expre);

        }
    }
}
